﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Criterion;

namespace MiserBlogData.Entities
{
    public class Discussion : A_Data
    {
        public virtual string Title { set; get; }
        public virtual DateTime UDate { set; get; }
        public virtual IList<Discussion> ChildList { get; set; }
        public virtual int GroupID { set; get; }
        //public virtual Discussion Parent { get; set; }

        public override System.Collections.Generic.IList<T> GetList<T>()
        {
            MiserDB.DataHelp.QueryHelper d = new MiserDB.DataHelp.QueryHelper();
            List<SimpleExpression> whereItem = new List<SimpleExpression>();
            //whereItem.Add(SimpleExpression("Id", "GroupID"));
            //whereItem.Add(Restrictions.Eq("Id", "GroupID"));
            //return d.GetList<T>(null, whereItem, null);
            return d.GetListT<T>();
        }
    }
}
